package com.neudu.ssrs_yyzxservice.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 膳食信息
 * @TableName food
 */
@TableName(value ="food")
@Data
public class Food {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer foodId;

    /**
     * 文件ID
     */
    private Integer uploadId;

    /**
     * 软删除（0：否，1：是）
     */
    private Integer deleted;

    /**
     * 膳食名称
     */
    private String foodname;

    /**
     * 膳食类别
     */
    private String foodtype;

    /**
     * 膳食标签
     */
    private String foodlabel;

    /**
     * 膳食价格
     */
    private Double foodprice;

    /**
     * 是否清真: 是0 否1
     */
    private String isMuslim;

    /**
     * 供应星期1
     */
    private String supplyDate;

    /**
     * 供应类型 1：早餐；2午餐；3晚餐
     */
    private String supplyType;

    /**
     * 图片地址
     */
    private String foodpic;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新的人
     */
    private String updater;

    /**
     * 更新的时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;



    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Food other = (Food) that;
        return (this.getFoodId() == null ? other.getFoodId() == null : this.getFoodId().equals(other.getFoodId()))
            && (this.getUploadId() == null ? other.getUploadId() == null : this.getUploadId().equals(other.getUploadId()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getFoodname() == null ? other.getFoodname() == null : this.getFoodname().equals(other.getFoodname()))
            && (this.getFoodtype() == null ? other.getFoodtype() == null : this.getFoodtype().equals(other.getFoodtype()))
            && (this.getFoodlabel() == null ? other.getFoodlabel() == null : this.getFoodlabel().equals(other.getFoodlabel()))
            && (this.getFoodprice() == null ? other.getFoodprice() == null : this.getFoodprice().equals(other.getFoodprice()))
            && (this.getIsMuslim() == null ? other.getIsMuslim() == null : this.getIsMuslim().equals(other.getIsMuslim()))
            && (this.getSupplyDate() == null ? other.getSupplyDate() == null : this.getSupplyDate().equals(other.getSupplyDate()))
            && (this.getSupplyType() == null ? other.getSupplyType() == null : this.getSupplyType().equals(other.getSupplyType()))
            && (this.getFoodpic() == null ? other.getFoodpic() == null : this.getFoodpic().equals(other.getFoodpic()))
            && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFoodId() == null) ? 0 : getFoodId().hashCode());
        result = prime * result + ((getUploadId() == null) ? 0 : getUploadId().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getFoodname() == null) ? 0 : getFoodname().hashCode());
        result = prime * result + ((getFoodtype() == null) ? 0 : getFoodtype().hashCode());
        result = prime * result + ((getFoodlabel() == null) ? 0 : getFoodlabel().hashCode());
        result = prime * result + ((getFoodprice() == null) ? 0 : getFoodprice().hashCode());
        result = prime * result + ((getIsMuslim() == null) ? 0 : getIsMuslim().hashCode());
        result = prime * result + ((getSupplyDate() == null) ? 0 : getSupplyDate().hashCode());
        result = prime * result + ((getSupplyType() == null) ? 0 : getSupplyType().hashCode());
        result = prime * result + ((getFoodpic() == null) ? 0 : getFoodpic().hashCode());
        result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", foodId=").append(foodId);
        sb.append(", uploadId=").append(uploadId);
        sb.append(", deleted=").append(deleted);
        sb.append(", foodname=").append(foodname);
        sb.append(", foodtype=").append(foodtype);
        sb.append(", foodlabel=").append(foodlabel);
        sb.append(", foodprice=").append(foodprice);
        sb.append(", isMuslim=").append(isMuslim);
        sb.append(", supplyDate=").append(supplyDate);
        sb.append(", supplyType=").append(supplyType);
        sb.append(", foodpic=").append(foodpic);
        sb.append(", creator=").append(creator);
        sb.append(", createTime=").append(createTime);
        sb.append(", updater=").append(updater);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}